package oop5;

/**
 * @author oldliu
 * @since 1.0
 */
public class USbArray {
    public static void main(String[] args) {
        //接口数组
        Usb[]b=new Usb[10];
        b[0]=new USbMouse();
        b[1]=new USBNetCard("tplink",1000);
        b[2]=new USBFan();

        for (int i = 0; i <b.length ; i++) {
            if(b[i]!=null)
                b[i].work();
        }
        //...
    }
}
